const AsideList =  [
    {
        title: '首页',
        icon: 'iconshouye',
        route: '/',
        children: []
    },
    {
        title: '管理员',
        icon: 'iconguanliyuan',
        children: [
            { title: '管理员列表',  route: '/admin/list' }
        ]
    },
    {
        title: '商品管理',
        icon: 'iconiconset0206',
        children: [
            { title: '商品列表',  route: '/goods/list' },
            { title: '分类列表',  route: '/goods/category' },
            { title: '品牌列表',  route: '/goods/brand' }
        ]
    },    
    {
        title: '订单管理',
        icon: 'icondingdan',
        children: [
            { title: '订单列表',  route: '/order/list' }
        ]
    },
    {
        title: '用户管理',
        icon: 'iconyonghu',
        children: [
            { title: '用户列表',  route: '/user/list' }
        ]
    },
    {
        title: '营销管理',
        icon: 'iconxitong',
        children: [
            { title: '广告列表',  route: '/market/adver_list' }
        ]
    },
    // {
    //     title: '设置',
    //     icon: 'iconshezhi',
    //     children: [
    //         { title: '广告列表',  route: '/adver/list' }
    //     ]
    // },
]

const asideList = AsideList.reduce((array, item, index) => {
    item.index = String(index + 1)
    item.children = item.children.map((v, i) =>{
        if(v) {
            v.index = String(`${index + 1}-${i + 1}`)
        }
        return v
    } )
    array.push(item)
    return array
}, [])
export default asideList